import React, { Component } from 'react'
import { connect } from 'dva';
import FormList from '../components/TemplateFrom';
import { queryInfoById } from '../service';

interface Props {
  match: {
    params: {
      id: number
    }
  }
}

@connect()
class Update extends Component<Props, any> {
  constructor(props) {
    super(props);
    this.state = {
      id: ''
    }
  }
  componentWillMount() {
    const { match } = this.props;
    const { params } = match;
    this.setState({
      id: params.id
    });
  }

  render() {
    return (
      <>
        <FormList data_id={this.state.id} />
      </>
    );
  }
}

export default Update;
